from string import capwords
from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能
from math import *


# 封印解除，部分技能等级+1
class 主动技能(主动技能):

    def 基础等级计算(self):
        if self.基础等级 == 0:
            super().基础等级计算()
            if self.所在等级 not in [50, 85, 100] and self.是否主动 == 1 and self.名称 in ['刀魂之卡赞', '冰霜之萨亚', '侵蚀之普戾蒙', '鬼斩', '瘟疫之罗刹', '冥炎之卡洛']:
                self.基础等级 = min(self.基础等级 + 1, self.等级上限)


class 技能0(被动技能):
    名称 = '基础精通'
    倍率 = 1.0
    所在等级 = 1
    等级上限 = 200
    关联技能 = ['残影之凯贾']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0*ceil(1/10)
        else:
            return round(self.倍率 * (0.463 + 0.089 * self.等级), 5)


class 技能1(主动技能):
    名称 = "鬼斩"
    所在等级 = 1
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 6
    MP = [17, 196]
    无色消耗 = 0
    data0 = [0, 1275, 1432, 1592, 1747, 1902, 2057, 2215, 2375, 2532, 2688, 2840, 3002, 3153, 3307, 3464, 3624, 3775, 3933, 4092, 4244, 4408, 4563, 4716, 4873, 5029, 5184, 5344, 5499, 5655, 5809, 5968, 6122, 6284, 6441, 6593, 6749, 6905, 7063, 7217, 7374, 7528, 7684, 7843, 7999, 8154, 8314, 8469, 8624, 8784, 8940, 9095, 9251, 9411, 9561, 9723, 9876, 10033, 10193, 10348, 10503, 10659, 10816, 10969, 11129, 11283, 11435, 11593, 11752, 11907, 12066]
    hit0 = 1
    data1 = [0, 1240, 1394, 1549, 1702, 1850, 2000, 2154, 2309, 2462, 2612, 2761, 2914, 3068, 3219, 3374, 3525, 3674, 3824, 3979, 4131, 4289, 4436, 4589, 4738, 4892, 5042, 5201, 5351, 5500, 5651, 5803, 5956, 6113, 6261, 6412, 6561, 6717, 6869, 7022, 7175, 7324, 7475, 7630, 7782, 7933, 8087, 8236, 8386, 8542, 8694, 8843, 8997, 9153, 9301, 9454, 9608, 9757, 9912, 10067, 10215, 10366, 10519, 10668, 10823, 10977, 11124, 11277, 11434, 11581, 11738]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 7

    def TP加成(self):
        return 1.0

    # 噬灵鬼斩额外加成倍率，TP只加成鬼斩部分
    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '')
        char: Character = argv.get('char', {})
        self.power0 = 1 + self.TP等级*self.TP成长
        self.power1 = char.get_skill_by_name("噬灵鬼斩").额外倍率()
        return super().等效百分比(**argv)


class 技能2(被动技能):
    名称 = '刀魂之卡赞'
    是否主动 = 1
    所在等级 = 5
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    MP = [10, 400]
    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.04 + 0.01 * self.等级, 5)


class 技能3(主动技能):
    名称 = "月光斩"
    所在等级 = 15
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 4
    MP = [17, 182]
    无色消耗 = 0
    data0 = [0, 683, 749, 820, 889, 958, 1028, 1097, 1164, 1234, 1305, 1373, 1443, 1512, 1582, 1650, 1719, 1788, 1858, 1928, 1997, 2065, 2135, 2204, 2273, 2343, 2410, 2480, 2551, 2619, 2688, 2759, 2826, 2895, 2965, 3033, 3105, 3174, 3241, 3311, 3380, 3449, 3519, 3586, 3656, 3727, 3795, 3864, 3935, 4003, 4072, 4141, 4209, 4280, 4350, 4418, 4487, 4557, 4625, 4695, 4764, 4831, 4902, 4972, 5041, 5110, 5180, 5248, 5317, 5386, 5456]
    hit0 = 1
    data1 = [0, 772, 851, 928, 1007, 1084, 1163, 1243, 1321, 1401, 1476, 1556, 1634, 1712, 1790, 1868, 1948, 2025, 2104, 2181, 2259, 2337, 2416, 2496, 2572, 2653, 2732, 2809, 2888, 2965, 3044, 3121, 3201, 3280, 3356, 3435, 3513, 3592, 3668, 3747, 3828, 3906, 3985, 4063, 4141, 4219, 4297, 4377, 4455, 4532, 4611, 4689, 4766, 4844, 4924, 5004, 5081, 5159, 5237, 5316, 5395, 5474, 5552, 5629, 5708, 5786, 5864, 5942, 6021, 6101, 6177]
    hit1 = 1
    data2 = [0, 1084, 1195, 1305, 1414, 1525, 1634, 1744, 1854, 1965, 2075, 2185, 2295, 2403, 2515, 2623, 2734, 2846, 2956, 3063, 3175, 3286, 3395, 3505, 3616, 3727, 3834, 3945, 4055, 4166, 4275, 4385, 4496, 4606, 4714, 4825, 4937, 5045, 5156, 5266, 5374, 5485, 5596, 5707, 5817, 5926, 6038, 6146, 6257, 6366, 6476, 6587, 6698, 6806, 6916, 7028, 7136, 7247, 7357, 7468, 7577, 7687, 7796, 7907, 8017, 8129, 8237, 8348, 8456, 8567, 8679]
    hit2 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能4(被动技能):
    名称 = '侵蚀之普戾蒙'
    是否主动 = 1
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 3
    等级精通 = 1
    MP = [40, 644]
    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.23 + 0.01 * self.等级, 5)


class 技能5(被动技能):
    名称 = '太刀精通'
    所在等级 = 15
    等级上限 = 40
    学习间隔 = 3
    等级精通 = 30
    关联技能 = ['所有']
    data0 = [0, 1.3, 2.8, 4.1, 5.4, 6.8, 8.2, 9.6, 10.9, 12.3, 13.7, 15, 16.4, 17.7, 19.1, 20.5, 21.9, 23.3, 24.5, 25.9, 27.3, 28.7, 30.1, 31.4, 32.8, 34.1, 35.5, 36.9, 38.2, 39.6, 41, 42.4, 43.7, 45, 46.4, 47.8, 49.2, 50.6, 52, 53.2, 54.6]

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 == '太刀':
            return self.data0[self.等级] / 100 + 1
        else:
            self.关联技能 = ['无']
            return 1.0


class 技能6(被动技能):
    名称 = '短剑精通'
    所在等级 = 15
    等级上限 = 40
    学习间隔 = 3
    等级精通 = 30
    关联技能 = ['所有']
    data0 = [0, 1.2, 2.6, 3.9, 5.1, 6.4, 7.7, 9, 10.3, 11.6, 12.9, 14.1, 15.4, 16.7, 18, 19.3, 20.6, 21.9, 23.1, 24.4, 25.7, 27, 28.3, 29.6, 30.9, 32.1, 33.4, 34.7, 36, 37.3, 38.6, 39.9, 41.1, 42.4, 43.7, 45, 46.3, 47.6, 48.9, 50.1, 51.4]

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 == '短剑':
            return self.data0[self.等级] / 100 + 1
        else:
            self.关联技能 = ['无']
            return 1.0


class 技能7(被动技能):
    名称 = '暗月降临'
    所在等级 = 15
    等级上限 = 20
    学习间隔 = 5
    等级精通 = 10
    关联技能 = ['所有']
    暗抗 = [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80]

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1 + 0.01 * self.等级, 5)

    def 等级加成(self, x, char: Character = {}):
        if self.等级 != 0:
            if self.等级 + x > self.等级上限:
                self.等级 = self.等级上限
                if self.基础等级 != self.等级上限 and self.关联技能 != ['无']:
                    self.等级溢出 = 1
            else:
                char.暗属性抗性加成(-self.暗抗[self.等级])
                self.等级 += x
                char.暗属性抗性加成(self.暗抗[self.等级])


class 技能8(主动技能):
    名称 = "残影之凯贾"
    所在等级 = 20
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    CD = 5
    MP = [194, 2125]
    无色消耗 = 0
    data0 = [0, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124]
    hit0 = 1
    data1 = [0, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143]
    hit1 = 1
    data2 = [0, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167]
    hit2 = 1
    data3 = [0, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185]
    hit3 = 1
    TP成长 = 0.10
    TP上限 = 5  # 基础精通


class 技能9(被动技能):
    名称 = '噬灵鬼斩'
    所在等级 = 25
    等级上限 = 5
    基础等级 = 1

    def 额外倍率(self):
        if self.等级 == 0:
            return 0.0
        else:
            return round(1.0 + 0.1 * self.等级, 5)


class 技能10(主动技能):
    名称 = "鬼影鞭"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 3
    等级精通 = 60
    CD = 8
    MP = [55, 700]
    无色消耗 = 0
    data0 = [0, 1700, 1972, 2244, 2516, 2787, 3058, 3330, 3601, 3872, 4143, 4415, 4686, 4958, 5230, 5500, 5771, 6043, 6314, 6585, 6857, 7129, 7400, 7669, 7943, 8213, 8486, 8757, 9025, 9298, 9569, 9842, 10113, 10385, 10655, 10928, 11198, 11469, 11742, 12011, 12284, 12555, 12828, 13099, 13368, 13640, 13911, 14184, 14454, 14727, 14996, 15268, 15540, 15812, 16083, 16353, 16625, 16897, 17167, 17439, 17711, 17982, 18254, 18524, 18796, 19067, 19338, 19609, 19881, 20153, 20424]
    hit0 = 1
    data1 = [0, 3971, 4604, 5237, 5870, 6503, 7135, 7770, 8403, 9036, 9669, 10303, 10935, 11569, 12203, 12835, 13467, 14101, 14733, 15367, 16001, 16633, 17266, 17900, 18533, 19166, 19799, 20431, 21064, 21698, 22331, 22964, 23599, 24231, 24865, 25498, 26132, 26763, 27397, 28029, 28663, 29296, 29930, 30562, 31196, 31829, 32462, 33096, 33728, 34360, 34994, 35627, 36260, 36894, 37527, 38159, 38793, 39428, 40059, 40693, 41326, 41959, 42592, 43226, 43858, 44492, 45125, 45758, 46391, 47024, 47656]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能11(主动技能):
    名称 = "冰霜之萨亚"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 15
    MP = [150, 1260]
    无色消耗 = 0
    data0 = [0, 856, 944, 1030, 1118, 1204, 1292, 1378, 1466, 1552, 1640, 1726, 1814, 1900, 1988, 2074, 2162, 2248, 2336, 2423, 2510, 2597, 2684, 2771, 2858, 2945, 3032, 3119, 3205, 3293, 3380, 3466, 3554, 3641, 3727, 3814, 3902, 3988, 4075, 4164, 4249, 4336, 4425, 4510, 4597, 4686, 4772, 4858, 4947, 5032, 5120, 5208, 5294, 5381, 5469, 5553, 5641, 5729, 5815, 5901, 5990, 6075, 6163, 6251, 6337, 6423, 6512, 6598, 6685, 6774, 6859]
    hit0 = 10
    TP成长 = 0.1
    TP上限 = 7

    def TP加成(self):
        return 1.0

    def 等效CD(self, **argv):
        self.hit0 = ceil(10 / (1 - 0.07 * self.TP等级))
        return super().等效CD(**argv)


class 技能12(主动技能):
    名称 = "死亡墓碑"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 18
    MP = [165, 1386]
    无色消耗 = 1
    data0 = [0, 1240, 1365, 1492, 1617, 1743, 1869, 1994, 2119, 2247, 2370, 2496, 2623, 2748, 2873, 3000, 3125, 3252, 3378, 3502, 3629, 3756, 3881, 4008, 4133, 4258, 4385, 4511, 4634, 4761, 4887, 5012, 5138, 5264, 5390, 5516, 5641, 5767, 5893, 6019, 6145, 6271, 6397, 6523, 6649, 6774, 6900, 7026, 7151, 7276, 7402, 7529, 7654, 7780, 7906, 8031, 8157, 8284, 8408, 8534, 8661, 8787, 8912, 9039, 9164, 9290, 9417, 9540, 9668, 9794, 9918]
    hit0 = 9
    TP成长 = 0.1
    TP上限 = 5


class 技能13(主动技能):
    名称 = "瘟疫之罗刹"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [154, 1293]
    无色消耗 = 1
    data0 = [0, 1176, 1295, 1417, 1536, 1654, 1773, 1894, 2013, 2132, 2253, 2371, 2490, 2610, 2731, 2850, 2968, 3088, 3208, 3326, 3447, 3566, 3683, 3804, 3923, 4043, 4165, 4283, 4401, 4520, 4641, 4760, 4879, 4999, 5118, 5237, 5358, 5477, 5597, 5715, 5835, 5954, 6074, 6194, 6313, 6430, 6552, 6672, 6791, 6912, 7031, 7148, 7267, 7387, 7507, 7626, 7745, 7864, 7985, 8105, 8224, None, None, None, None, None, None, None, None, None, None]
    hit0 = 10
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 0.5 * 1.1 + 1.1 * 5 * 0.1 * 1.24


class 技能14(主动技能):
    名称 = "鬼斩：狂怒"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [165, 1386]
    无色消耗 = 1
    data0 = [0, 13411, 14772, 16131, 17491, 18853, 20213, 21574, 22934, 24295, 25655, 27015, 28378, 29737, 31098, 32459, 33820, 35181, 36539, 37900, 39261, 40622, 41983, 43344, 44704, 46063, 47424, 48785, 50146, 51506, 52867, 54228, 55588, 56950, 58308, 59670, 61031, 62392, 63753, 65113, 66472, 67833, 69194, 70555, 71915, 73276, 74637, 75996, 77357, 78718, 80078, 81439, 82800, 84161, 85520, 86880, 88242, 89603, 90964, 92325, 93685, 95046, 96406, 97766, 99127, 100487, 101848, 103209, 104570, 105930, 107290]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.35


class 技能15(主动技能):
    名称 = "鬼影闪"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [200, 1680]
    无色消耗 = 1
    data0 = [0, 11024, 12143, 13263, 14380, 15499, 16617, 17737, 18856, 19974, 21093, 22210, 23328, 24448, 25567, 26685, 27805, 28923, 30040, 31159, 32278, 33396, 34515, 35633, 36750, 37869, 38988, 40107, 41226, 42344, 43463, 44580, 45700, 46818, 47937, 49055, 50176, 51293, 52411, 53530, 54649, 55767, 56887, 58005, 59122, 60242, 61360, 62478, 63598, 64717, 65835, 66953, 68071, 69188, 70308, 71427, 72545, 73663, 74781, 75899, 77020, 78138, 79257, 80376, 81493, 82613, 83731, 84849, 85969, 87087, 88204]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5


class 技能16(主动技能):
    名称 = "冥炎之卡洛"
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 5
    MP = [492, 4920]
    无色消耗 = 2
    data0 = [0, 330, 365, 398, 431, 465, 498, 531, 564, 601, 633, 664, 699, 733, 765, 801, 834, 866, 900, 934, 967, 1002, 1033, 1068, 1101, 1134, 1166, 1204, 1237, 1267, 1304, 1335, 1372, 1405, 1437, 1470, 1505, 1539, 1571, 1606, 1638, 1673, 1705, 1741, 1775, 1807, 1842, 1874, 1908, 1940, 1977, 2009, 2042, 2076, 2111, 2146, 2179, 2211, 2243, 2275, 2312, 2345, 2378, 2412, 2447, 2479, 2514, 2546, 2580, 2614, 2647]
    hit0 = 3
    data1 = [0, 202, 223, 244, 264, 284, 306, 326, 346, 366, 387, 408, 429, 450, 469, 491, 509, 531, 554, 572, 594, 614, 634, 655, 675, 696, 717, 736, 757, 778, 798, 820, 839, 861, 882, 901, 921, 942, 963, 985, 1005, 1023, 1047, 1068, 1087, 1107, 1130, 1150, 1166, 1190, 1211, 1233, 1251, 1272, 1294, 1316, 1332, 1353, 1375, 1396, 1416, 1437, 1458, 1475, 1497, 1519, 1539, 1560, 1580, 1600, 1623]
    hit1 = 0
    TP成长 = 0.1
    TP上限 = 5

    形态 = ["分身", "冥炎"]

    def 形态变更(self, 形态, char: Character):
        if (形态 == '' or (形态 not in self.形态 and 形态!='爆炸')) and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "分身":
            self.hit0 = 1
            self.hit1 = 0
            self.hit2 = 0
        if 形态 == "冥炎":
            self.hit0 = 0
            self.hit1 = 1
            self.hit2 = 0
        if 形态 == "爆炸":
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 1
            self.data2 = self.data1


class 技能17(主动技能):
    名称 = "冥炎剑"
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 45
    MP = [492, 4920]
    无色消耗 = 2
    data0 = [0, 1312, 1444, 1577, 1713, 1845, 1978, 2111, 2244, 2376, 2509, 2646, 2777, 2911, 3043, 3176, 3308, 3443, 3575, 3709, 3843, 3975, 4108, 4241, 4375, 4507, 4642, 4774, 4907, 5041, 5174, 5307, 5440, 5575, 5706, 5840, 5972, 6106, 6240, 6372, 6505, 6638, 6772, 6905, 7038, 7171, 7304, 7437, 7570, 7706, 7837, 7972, 8103, 8236, 8368, 8502, 8638, 8771, 8904, 9035, 9168, 9301, 9436, 9571, 9703, 9836, 9967, 10101, 10233, 10368, 10500]
    hit0 = 2
    data1 = [0, 1921, 2115, 2311, 2506, 2700, 2895, 3092, 3286, 3482, 3677, 3873, 4065, 4261, 4456, 4650, 4847, 5041, 5236, 5431, 5627, 5821, 6017, 6210, 6405, 6600, 6796, 6991, 7185, 7381, 7575, 7771, 7966, 8161, 8354, 8551, 8745, 8940, 9136, 9329, 9525, 9720, 9915, 10110, 10307, 10499, 10695, 10890, 11085, 11280, 11474, 11669, 11864, 12061, 12255, 12451, 12644, 12839, 13034, 13230, 13424, 13618, 13814, 14009, 14205, 14400, 14596, 14788, 14984, 15179, 15374]
    hit1 = 2
    data2 = [0, 4120, 4537, 4957, 5374, 5793, 6210, 6629, 7045, 7466, 7884, 8301, 8719, 9137, 9555, 9973, 10392, 10810, 11227, 11645, 12063, 12482, 12901, 13319, 13735, 14154, 14571, 14991, 15408, 15827, 16244, 16662, 17080, 17499, 17917, 18336, 18753, 19171, 19588, 20007, 20426, 20842, 21262, 21679, 22096, 22517, 22934, 23352, 23770, 24188, 24605, 25024, 25443, 25860, 26277, 26697, 27113, 27533, 27952, 28368, 28787, 29205, 29622, 30041, 30459, 30877, 31295, 31711, 32131, 32549, 32968]
    hit2 = 2
    data3 = [0, 6693, 7371, 8051, 8729, 9409, 10087, 10765, 11445, 12125, 12803, 13483, 14161, 14841, 15520, 16199, 16877, 17556, 18235, 18914, 19593, 20272, 20952, 21630, 22311, 22987, 23667, 24346, 25026, 25704, 26383, 27062, 27742, 28421, 29100, 29777, 30457, 31137, 31815, 32494, 33174, 33853, 34532, 35210, 35888, 36570, 37249, 37926, 38604, 39285, 39964, 40642, 41321, 42001, 42680, 43360, 44036, 44716, 45396, 46075, 46753, 47433, 48112, 48792, 49468, 50148, 50828, 51507, 52186, 52863, 53544]
    hit3 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.28


class 技能18(被动技能):
    名称 = '恐惧光环'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.105 + 0.015 * self.等级, 5)


class 技能19(主动技能):
    名称 = '第七鬼神：邪神之怖拉修'

    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 140
    MP = [600, 5040]
    无色消耗 = 5
    data0 = [0, 9196, 11329, 13461, 15594, 17727, 19860, 21992, 24123, 26258, 28391, 30522, 32654, 34787, 36921, 39054, 41184, 43317, 45451, 47585, 49716, 51848, 53981, 56114, 58246, 60379, 62512, 64644, 66776, 68909, 71042, 73176, 75306, 77440, 79572, 81706, 83839, 85971, 88103, 90235, 92369, None, None, None, None, None, None, None, None, None, None]
    hit0 = 1
    data1 = [0, 12432, 15315, 18200, 21084, 23968, 26849, 29732, 32616, 35499, 38380, 41265, 44148, 47033, 49916, 52797, 55680, 58564, 61448, 64332, 67213, 70097, 72981, 75864, 78748, 81629, 84513, 87396, 90281, 93163, 96046, 98929, 101812, 104697, 107579, 110461, 113345, 116229, 119113, 121994, 124878, None, None, None, None, None, None, None, None, None, None]
    hit1 = 1
    data2 = [0, 2476, 3050, 3624, 4197, 4773, 5346, 5922, 6495, 7071, 7644, 8219, 8792, 9367, 9940, 10516, 11089, 11665, 12238, 12812, 13385, 13960, 14535, 15109, 15684, 16258, 16832, 17406, 17981, 18554, 19130, 19703, 20279, 20852, 21427, 21999, 22576, 23149, 23724, 24298, 24873, None, None, None, None, None, None, None, None, None, None]
    hit2 = 5

    power0 = 1.8
    power1 = 1.8
    倍率 = 1.1
    CD = 140


class 技能20(主动技能):
    名称 = "鬼斩：炼狱"
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 30
    MP = [400, 1120]
    无色消耗 = 1
    data0 = [0, 1773, 1954, 2135, 2313, 2494, 2673, 2855, 3033, 3213, 3394, 3573, 3755, 3934, 4115, 4293, 4474, 4654, 4833, 5013, 5195, 5376, 5555, 5734, 5914, 6094, 6274, 6454, 6634, 6814, 6993, 7176, 7354, 7535, 7715, 7895, 8074, 8253, 8435, 8613, 8795, 8974, 9155, 9335, 9515, 9695, 9873, 10055, 10234, 10416, 10594]
    hit0 = 1
    data1 = [0, 6899, 7600, 8300, 9000, 9699, 10401, 11101, 11802, 12500, 13199, 13899, 14601, 15301, 16001, 16701, 17400, 18103, 18801, 19500, 20200, 20900, 21603, 22302, 23002, 23701, 24402, 25103, 25801, 26501, 27201, 27902, 28603, 29303, 30002, 30703, 31402, 32100, 32803, 33502, 34203, 34901, 35602, 36303, 37004, 37704, 38401, 39102, 39802, 40504, 41202]
    hit1 = 2
    data2 = [0, 5914, 6515, 7113, 7715, 8313, 8915, 9515, 10114, 10715, 11315, 11916, 12515, 13114, 13715, 14316, 14913, 15515, 16115, 16716, 17314, 17914, 18515, 19116, 19713, 20315, 20915, 21516, 22115, 22714, 23315, 23916, 24515, 25115, 25716, 26317, 26916, 27514, 28117, 28715, 29317, 29916, 30518, 31116, 31717, 32317, 32917, 33516, 34117, 34718, 35318]
    hit2 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.power2 = 1.43 * (1 + 0.09 * 5)
        self.CDR *= 0.9


class 技能21(主动技能):
    名称 = "冥祭之沼"
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [822, 1726]
    无色消耗 = 2
    data0 = [0, 22732, 25040, 27345, 29649, 31958, 34264, 36573, 38878, 41183, 43487, 45796, 48101, 50407, 52715, 55018, 57326, 59633, 61939, 64247, 66553, 68856, 71166, 73471, 75776, 78084, 80388, 82695, 85002, 87308, 89615, 91922, 94227, 96533, 98841, 101145, 103452, 105759, 108064, 110372, 112677, 114985, 117291, 119597, 121902, 124210, 126514, 128821, 131126, 133433, 135740]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.28


class 技能22(主动技能):
    名称 = "幽魂之布雷德"
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [580, 4500]
    无色消耗 = 3
    data0 = [0, 463, 511, 558, 607, 652, 701, 747, 795, 842, 888, 936, 982, 1030, 1077, 1126, 1172, 1220, 1267, 1313, 1361, 1406, 1455, 1502, 1551, 1598, 1644, 1691, 1738, 1785, 1831, 1881, 1927, 1974, 2021, 2068, 2114, 2163, 2210, 2258, 2305, 2351, 2398, 2445, 2493, 2540, 2586, 2635, 2683, 2729, 2776]
    hit0 = 32
    data1 = [0, 5176, 5699, 6226, 6750, 7275, 7801, 8327, 8850, 9375, 9901, 10428, 10951, 11477, 12002, 12527, 13051, 13578, 14103, 14628, 15153, 15676, 16204, 16729, 17252, 17777, 18303, 18829, 19354, 19879, 20403, 20929, 21454, 21979, 22504, 23029, 23555, 24078, 24606, 25129, 25656, 26179, 26704, 27229, 27757, 28279, 28805, 29331, 29854, 30382, 30905]
    hit1 = 4
    data2 = [0, 29115, 32069, 35021, 37976, 40928, 43883, 46838, 49790, 52745, 55699, 58651, 61606, 64560, 67512, 70468, 73422, 76373, 79327, 82284, 85236, 88190, 91145, 94097, 97051, 100006, 102957, 105912, 108865, 111819, 114775, 117727, 120681, 123635, 126587, 129543, 132496, 135448, 138403, 141358, 144309, 147264, 150220, 153172, 156126, 159079, 162033, 164987, 167940, 170893, 173848]
    hit2 = 1

    是否有护石 = 1

    形态 = ["满", "秒C"]

    def 形态变更(self, 形态, char: Character):
        if (形态 == '' or 形态 not in self.形态) and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "满":
            self.hit0 = 32
            if '幽魂之布雷德' in char.护石栏:
                self.hit0 = 24
                self.power1 = 1.61
                self.power2 = 1.41
        else:
            self.hit0 = 4
            if '幽魂之布雷德' in char.护石栏:
                self.hit0 = 24
                self.power1 = 1.61
                self.power2 = 1.41

    def 装备护石(self, char):
        self.hit0 = 24
        self.power1 = 1.61
        self.power2 = 1.41


class 技能23(被动技能):
    名称 = '御鬼之极'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.20 + 0.02 * self.等级, 5)


class 技能24(主动技能):
    名称 = "幽魂降临：式"
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 45
    MP = [800, 6000]
    无色消耗 = 5
    data0 = [0, 25669, 28272, 30877, 33483, 36085, 38690, 41294, 43900, 46502, 49105, 51711, 54313, 56917, 59524, 62128, 64731, 67336, 69940, 72544, 75147, 77754, 80357, 82961, 85566, 88171, 90773, 93376, 95982, 98585, 101191, 103794, 106399, 109002, 111607, 114212, 116816, 119418, 122024, 124627, 127230, 123653, 126133, 128613, 131094, 133574, 136053, 138534, 141015, 143494, 145975]
    hit0 = 1
    data1 = [0, 38502, 42411, 46316, 50224, 54128, 58034, 61943, 65847, 69754, 73659, 77567, 81472, 85379, 89287, 93191, 97098, 101003, 104910, 108815, 112724, 116629, 120536, 124442, 128346, 132254, 136159, 140067, 143971, 147880, 151786, 155691, 159598, 163503, 167410, 171315, 175224, 179130, 183035, 186941, 190849, 185480, 189200, 192921, 196641, 200361, 204082, 207802, 211523, 215242, 218963]
    hit1 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.34


class 技能25(主动技能):
    名称 = "王者号令：吉格降临"
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 180
    MP = [2500, 5000]
    无色消耗 = 10
    data0 = [0, 23365, 28782, 34201, 39620, 45036, 50455, 55873, 61291, 66710, 72125, 77545, 82964, 88382, 93800, 99218, 104636, 110055, 115469, 120888, 126308, 131726, 137143, 142560, 147979, 153399, 158814, 164234, 169652, 175069, 180490, 185904, 191323, 196742, 202158, 207578, 212996, 218414, 223833, 229249, 234668, 240087, 245503, 250922, 256339, 261757, 267177, 272593, 278012, 283431, 288848]
    hit0 = 1
    data1 = [0, 1168, 1439, 1709, 1980, 2251, 2520, 2793, 3065, 3334, 3606, 3877, 4148, 4419, 4689, 4960, 5230, 5502, 5772, 6044, 6315, 6585, 6856, 7129, 7399, 7669, 7940, 8210, 8481, 8754, 9024, 9294, 9567, 9835, 10107, 10379, 10648, 10921, 11190, 11461, 11733, 12004, 12275, 12544, 12816, 13088, 13358, 13630, 13899, 14170, 14443]
    hit1 = 15
    data2 = [0, 29206, 35977, 42752, 49523, 56297, 63067, 69841, 76613, 83386, 90159, 96932, 103705, 110477, 117249, 124022, 130795, 137567, 144339, 151110, 157885, 164656, 171430, 178201, 184976, 191747, 198519, 205291, 212066, 218836, 225610, 232383, 239156, 245928, 252701, 259474, 266244, 273018, 279790, 286562, 293334, 300109, 306879, 313653, 320425, 327200, 333969, 340743, 347515, 354287, 361060]
    hit2 = 1
    data3 = [0, 46730, 57566, 68401, 79236, 90074, 100911, 111746, 122580, 133418, 144255, 155090, 165926, 176763, 187600, 198434, 209270, 220107, 230944, 241779, 252615, 263450, 274288, 285123, 295959, 306795, 317633, 328468, 339303, 350139, 360977, 371814, 382648, 393483, 404321, 415158, 425992, 436829, 447666, 458503, 469335, 480173, 491008, 501847, 512679, 523516, 534352, 545191, 556024, 566861, 577697]
    hit3 = 1


class 技能26(主动技能):
    名称 = "鬼神剑·黄泉摆渡"
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 60
    MP = [1064, 7980]
    无色消耗 = 7
    data0 = [0, 26559, 29254, 31949, 34643, 37339, 40034, 42726, 45423, 48117, 50812, 53506, 56202, 58895, 61591, 64285, 66980, 69674, 72369, 75063, 77758, 80452, 83147, 85842, 88537, 91230, 93926, 96619, 99313, 102009, 104704, 107397, 110092, 112788, 115480, 118176, 120870, 123566, 126259, 128954, 131649, 134344, 137038, 139733, 142428, 145121, 147816, 150511, 153207, 155901, 158596]
    hit0 = 2
    data1 = [0, 13280, 14628, 15974, 17321, 18670, 20016, 21363, 22709, 24059, 25405, 26753, 28100, 29447, 30794, 32142, 33488, 34837, 36184, 37531, 38877, 40226, 41573, 42919, 44267, 45616, 46963, 48309, 49656, 51002, 52352, 53699, 55046, 56394, 57741, 59088, 60435, 61782, 63130, 64478, 65825, 67172, 68520, 69866, 71213, 72561, 73908, 75256, 76603, 77951, 79297]
    hit1 = 1
    data2 = [0, 46480, 51195, 55912, 60627, 65342, 70059, 74774, 79488, 84206, 88921, 93636, 98352, 103067, 107782, 112498, 117214, 121929, 126645, 131360, 136076, 140791, 145506, 150223, 154938, 159653, 164369, 169084, 173799, 178516, 183231, 187946, 192663, 197378, 202093, 206810, 211526, 216242, 220957, 225672, 230388, 235103, 239818, 244534, 249249, 253965, 258680, 263396, 268111, 272827, 277543]
    hit2 = 1
    data3 = [0, 3984, 4388, 4793, 5195, 5598, 6005, 6408, 6813, 7217, 7622, 8024, 8432, 8834, 9238, 9643, 10046, 10450, 10854, 11259, 11663, 12067, 12471, 12877, 13280, 13686, 14088, 14491, 14896, 15301, 15706, 16109, 16515, 16917, 17321, 17727, 18131, 18534, 18939, 19342, 19746, 20151, 20555, 20960, 21364, 21769, 22171, 22575, 22980, 23384, 23789]
    hit3 = 5

class 技能27(被动技能):
    名称 = '鬼神冠冕'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能28(主动技能):
    名称 = "黄泉之门：万鬼度灵"
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 290
    MP = [4028, 8056]
    无色消耗 = 15
    data0 = [0, 22304, 27474, 32648, 37818, 42991, 48163, 53336, 58507, 63679, 68851, 74022, 79195, 84367, 89539, 94710, 99883, 105054, 110226, 115400, 120569, 125743, 130915, 136086, 141258, 146429, 151602, 156774, 161947, 167117, 172289, 177462, 182633, 187806, 192977, 198149, 203321, 208494, 213665, 218837, 224010, 229181, 234353, 239525, 244697, 249869, 255041, 260213, 265384, 270557, 275729]
    hit0 = 1
    data1 = [0, 133822, 164855, 195886, 226918, 257950, 288980, 320013, 351045, 382077, 413108, 444139, 475170, 506203, 537235, 568268, 599298, 630330, 661363, 692394, 723426, 754458, 785488, 816521, 847552, 878584, 909614, 940647, 971679, 1002710, 1033743, 1064772, 1095805, 1126838, 1157868, 1188901, 1219931, 1250963, 1281995, 1313027, 1344060, 1375091, 1406123, 1437155, 1468186, 1499218, 1530250, 1561281, 1592313, 1623345, 1654376]
    hit1 = 2
    data2 = [0, 5946, 7327, 8705, 10084, 11465, 12843, 14220, 15601, 16981, 18359, 19740, 21118, 22497, 23878, 25256, 26635, 28014, 29395, 30771, 32151, 33531, 34910, 36288, 37669, 39047, 40426, 41807, 43185, 44565, 45945, 47323, 48701, 50081, 51460, 52839, 54217, 55598, 56977, 58355, 59737, 61115, 62494, 63873, 65252, 66631, 68010, 69389, 70769, 72148, 73528]
    hit2 = 15
    data3 = [0, 8362, 10301, 12242, 14183, 16122, 18061, 20000, 21940, 23879, 25819, 27759, 29698, 31637, 33577, 35517, 37455, 39394, 41334, 43274, 45213, 47151, 49092, 51032, 52973, 54910, 56850, 58790, 60730, 62668, 64607, 66548, 68488, 70427, 72366, 74305, 76245, 78184, 80124, 82063, 84002, 85943, 87882, 89822, 91761, 93700, 95640, 97579, 99518, 101458, 103398]
    hit3 = 8


class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'soul_bender'
        self.名称 = '极诣·鬼泣'
        self.角色 = '鬼剑士(男)'

        self.职业 = '鬼泣'
        self.武器选项 = ['太刀', '短剑']
        self.输出类型选项 = ['魔法百分比']
        self.防具精通属性 = ['智力']
        self.类型 = '魔法百分比'
        self.武器类型 = '太刀'
        self.防具类型 = '布甲'
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.69

        super().__init__(equVersion)

    def 技能队列设置(self, setinfo):
        self.技能队列 = []
        CP武器 = False
        for i in self.装备栏:
            if i in [418, 417]:
                CP武器 = True
        for item in setinfo:
            self.技能队列.append({
                '名称': item['name'],
                '无色消耗': self.get_skill_by_name(item['name']).无色消耗,
                '倍率': 1.0,
                '等级变化': 0,
                'CDR': 1.0,
                '恢复': 0,
                '形态': item.get('mode', '')
            })
            if CP武器:
                if item['name'] in ['鬼斩', '鬼斩：狂怒', '鬼影闪', '鬼斩：炼狱', '幽魂降临：式']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 1.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '恢复': 0,
                        '形态': '爆炸'
                    })
                if item['name'] in ['月光斩', '鬼神剑·黄泉摆渡']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 2.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '恢复': 0,
                        '形态': '爆炸'
                    })
                if item['name'] in ['冥炎剑']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 4.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '恢复': 0,
                        '形态': '爆炸'
                    })

    def 职业特殊计算(self):
        冥炎剑 = self.get_skill_by_name('冥炎剑')
        冥炎剑.等级上限 = 70
        冥炎剑.等级 = self.get_skill_by_name('冥炎之卡洛').等级

    # 抗性有成长的较为特殊 需要按照以下进行添加
    def 职业特殊设置(self):
        暗月降临 = self.get_skill_by_name("暗月降临")
        self.暗属性抗性加成(暗月降临.暗抗[暗月降临.等级])

    def set_skill_info(self, info, rune_except=[], clothes_pants=[]):
        super().set_skill_info(info, clothes_pants=['刀魂之卡赞', '太刀精通', '短剑精通'])
